#include <stdio.h>
#include "main.h"

#include "dmr_gpio.h"

int main(void)
{
    RCC_ClocksType RCC_ClocksStatus;
	
    RCC_Clocks_Frequencies_Value_Get(&RCC_ClocksStatus);

	//LED_R句柄
	dmr_gpioHandle rLed_Handle = {0};
	//PD13
	rLed_Handle.gpiox 	= GPIOD;
	rLed_Handle.pin		= GPIO_PIN_13;
	//推挽模式
	rLed_Handle.mode 	= GPIO_MODE_OUT_PP;
	//上拉
	rLed_Handle.pull 	= GPIO_PULL_UP;
	//低速
	rLed_Handle.speed 	= GPIO_SLEW_RATE_SLOW;
	//2ma驱动电流
	rLed_Handle.current = GPIO_DS_2MA;
	//初始IO电平
	rLed_Handle.initLevel = DMR_PIN_INIT_LEVEL_HIGE;
	//初始化GPIO配置
	dmr_gpioInit(&rLed_Handle);
	
	
	//LED_G句柄
	dmr_gpioHandle gLed_Handle = {0};
	//PC13
	gLed_Handle.gpiox 	= GPIOC;
	gLed_Handle.pin		= GPIO_PIN_13;
	//推挽模式
	gLed_Handle.mode 	= GPIO_MODE_OUT_PP;
	//上拉
	gLed_Handle.pull 	= GPIO_PULL_UP;
	//低速
	gLed_Handle.speed 	= GPIO_SLEW_RATE_SLOW;
	//2ma驱动电流
	gLed_Handle.current = GPIO_DS_2MA;
	//初始IO电平
	gLed_Handle.initLevel = DMR_PIN_INIT_LEVEL_LOW;
	//初始化GPIO配置
	dmr_gpioInit(&gLed_Handle);
	

    while (1)
    {
		;
    }
}

#ifdef USE_FULL_ASSERT

/**
*\*\name    assert_failed.
*\*\fun     Reports the name of the source file and the source line number
*\*\        where the assert_param error has occurred.
*\*\param   file pointer to the source file name
*\*\param   line assert_param error line source number
*\*\return  none
**/
static void assert_failed(const uint8_t* expr, const uint8_t* file, uint32_t line)
{
    /* User can add his own implementation to report the file name and line number,
       ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */

    /* Infinite loop */
    while (1)
    {
    }
}

#endif


